Optimal. Leaf size=30 \[ \frac{2 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{\sqrt{3}}-\log \left (1-x^3\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0302431, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {1871, 1586, 618, 204, 260} \[ \frac{2 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{\sqrt{3}}-\log \left (1-x^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1871
Rule 1586
Rule 618
Rule 204
Rule 260
Rubi steps
\begin{align*} \int \frac{1-x+3 x^2}{1-x^3} \, dx &=3 \int \frac{x^2}{1-x^3} \, dx+\int \frac{1-x}{1-x^3} \, dx\\ &=-\log \left (1-x^3\right )+\int \frac{1}{1+x+x^2} \, dx\\ &=-\log \left (1-x^3\right )-2 \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=\frac{2 \tan ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )}{\sqrt{3}}-\log \left (1-x^3\right )\\ \end{align*}
Mathematica [A] time = 0.008519, size = 30, normalized size = 1. \[ \frac{2 \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{\sqrt{3}}-\log \left (1-x^3\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 33, normalized size = 1.1 \begin{align*} -\ln \left ( -1+x \right ) -\ln \left ({x}^{2}+x+1 \right ) +{\frac{2\,\sqrt{3}}{3}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.44615, size = 43, normalized size = 1.43 \begin{align*} \frac{2}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - \log \left (x^{2} + x + 1\right ) - \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.23767, size = 101, normalized size = 3.37 \begin{align*} \frac{2}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - \log \left (x^{2} + x + 1\right ) - \log \left (x - 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.121207, size = 5, normalized size = 0.17 \begin{align*} - \log{\left (x - 1 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06748, size = 45, normalized size = 1.5 \begin{align*} \frac{2}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) - \log \left (x^{2} + x + 1\right ) - \log \left ({\left | x - 1 \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]